<div class="gray-bg">
    <!--<div class="bg-light lter b-b wrapper-md">
	    <h1 class="m-n font-thin h3">设备管理</h1>
	</div>-->
	<div class="wrapper">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">
		              	创建设备
                </div>
                
                <div class="panel-body">
                	
                    <form class="form-group">
                    	<div class="radio col-sm-2" style="padding: 0;">
					            <label class="radio-inline">
					                <input type="radio" checked="" value="HEZU" ng-model="way_1" name="optionsRadios">合租</label>
					            <label class="radio-inline">
					                <input type="radio" value="ZHENGZU" ng-model="way_1" id="" name="optionsRadios">整租</label>
						</div>   
                        <div class="col-sm-4" style="padding: 0;">
                        	<div class="col-sm-4">
								<select class="inn_select" ng-model="pro_1" ng-change="proFunc_1(pro_1)">
									<option value="">省份 </option>
									<option value="{{k.pro_id}}" ng-repeat="k in prolist">{{k.name}}</option>
								</select>
							 </div>  
	                        <div class="col-sm-4">
	                            <select class="inn_select" ng-model="cty_1" ng-change="ctyFunc_1(cty_1)">
									<option value="">市/地区</option>
									<option value="{{k.city_id}}" ng-repeat="k in citylist">{{k.name}}</option>
								</select>
	                        </div>  
	                        <div class="col-sm-4">
								<select class="inn_select" ng-model="dis_1">
									<option value="">区/县 </option>
									<option value="{{k.dis_id}}" ng-repeat="k in dislist">{{k.name}}</option>
								</select>
							 </div>  
                        </div>  
                        <div class="col-sm-5">
                        	<div class="col-sm-3 padding_right">
	                            <input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="tric_nmb"  placeholder="小区名" />
	                        </div>
	                        <div class="col-sm-3 padding_right">
								<input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="adr_nmb"  placeholder="地址" />
	                        </div>
	                        <div class="col-sm-2 padding_right">
	                            <input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="floor_nmb"  placeholder="楼栋" />
	                        </div>
	                        <div class="col-sm-2 padding_right">
								<input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="unit_nmb"  placeholder="单元" />
	                        </div> 
	                        <div class="col-sm-2 padding_right">
								<input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="room_nmb"  placeholder="房号" />
	                        </div> 
                        </div>
                        
                        <div class="col-sm-1">
                       	 	<button class="btn bg-color" ng-click="sear_2(way_1,pro_1,cty_1,dis_1,tric_nmb,adr_nmb,floor_nmb,unit_nmb,room_nmb,DB,MS)">&nbsp;&nbsp;&nbsp;搜索&nbsp;&nbsp;&nbsp;&nbsp;</button>
                        </div> 
                       	<div class="col-sm-12" style="padding: 0;">
							<div class="col-sm-10" style="padding: 0;">
								<label class="checkbox-inline" >
						            <input type="checkbox" ng-true-value="'WAIT'" ng-false-value="''" ng-model="DB" name="noCheckbox" ng-click="sear_2(way_1,pro_1,cty_1,dis_1,tric_nmb,adr_nmb,floor_nmb,unit_nmb,room_nmb,DB,MS)">未安装电表</label>
								<label class="checkbox-inline" >
						            <input type="checkbox" ng-true-value="'WAIT'" ng-false-value="''" ng-model="MS" name="noCheckbox" ng-click="sear_2(way_1,pro_1,cty_1,dis_1,tric_nmb,adr_nmb,floor_nmb,unit_nmb,room_nmb,DB,MS)">未安装门锁</label>
							</div>                       		
					        <div class="col-sm-1 text-right ">
					        	<button class="btn bg-color" ng-disabled="oMS" ng-click="openDoorModal()">创建门锁</button>
					        </div>
					        <div class="col-sm-1 ">
					        	<button class="btn bg-color" ng-disabled="oDB" ng-click="openAmmeterModal()">创建电表</button>
					        </div>
                       	</div>
                    </form>
                </div>
                <table class="table table-hover text-center">
				 	<thead style="font-weight: bold;">
				 		<td>
				 			<label class="checkbox-inline" >
				 				<input type="checkbox" ng-model="master" ng-click="checkAll(master,list_1)">
				 				全选
				 			</label>
				 		</td>
				        <td>房源编号</td>
				        <td>小区/公寓</td>
				        <td>街道/门牌号</td>
				        <td>楼栋</td>
				        <td>单元</td>
				        <td>房号</td>
				        <td>房门</td>
				        <td>待装设备</td>
			        </thead>
			        <tbody>
			        	<tr ng-repeat="x in list_1">
			        		<td>
			        			<label class="checkbox-inline" >
				        			<input id={{x.id}} type="checkbox" ng-model="isSelect" ng-checked="master" ng-click="updateCheck(x.id,isSelect)">
				        			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					 			</label>
			        		</td>
			        		<td>{{x.code}}</td>
					        <td>{{x.districtName}}</td>
					        <td>{{x.houseStreet.provinceName}}{{x.houseStreet.cityName}}{{x.houseStreet.distName}}{{x.houseStreet.address}}</td>
					        <td>{{x.floorNo | clearZero}}</td>
					        <td>{{x.unit | clearZero}}</td>
					        <td>{{x.roomNo}}</td>
					        <td>{{x.door}}</td>
					        <td>
					        	<!--<span href="" ng-repeat="k in x.hardwares" style="{{k.type | style}}">{{k.type | warsName}}</span>-->
					        	<span ng-if="x.doorLockInstallStatus == 'WAIT'?true:false" href="" style="margin-right:20px">门锁</span>
					        	<span ng-if="x.ammeterInstallStatus == 'WAIT'?true:false" href="" style="margin-right:20px">电表</span>
					        </td>
			        	</tr>
				        
			        </tbody>
			        <tfoot>
			        	<tr>
				            <td colspan="12" id="pager_1">
				               
				            </td>
				        </tr>
						
			        </tfoot>
				</table>
            </div>
        </div>
    </div>
</div>

</div>
<!--创建门锁选择厂商-->
<div class="modal fade" id="modal_door" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">供应商选择</h4>
            </div>
            <div class="modal-body wrapper" style="height: 150px;">
            	
            	<div class="row">
				  <div class="col-lg-12">
				  	<select id="doorSupplier" name="doorSupplier" class="inn_select ng-pristine ng-valid ng-touched">
			      		<option value="0">请选择门锁供应商</option>
			      		<option value="{{k.code}}" ng-repeat="k in door_supplier_list">{{k.name}}</option>
			      		<!--<option value="1">云柚</option>
			      		<option value="2">丁盯</option>-->
			      	</select>
				  </div><!-- /.col-lg-6 -->
				</div><!-- /.row -->
            	
            </div>
            <div class="modal-footer">
                <button class="btn bg-color" ng-disabled="sMs" ng-click="createDoor()">确定</button>
                <button class="btn" data-dismiss="modal" aria-label="Close">取消</button>
            </div>
        </div>
    </div>
</div>
<!--创建电表选择厂商-->
<div class="modal fade" id="modal_ammeter" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">供应商选择</h4>
            </div>
            <div class="modal-body wrapper" style="height: 150px;">
            	
            	<div class="row">
				  <div class="col-lg-12">
				  	<select id="ammeterSupplier" name="ammeterSupplier" class="inn_select ng-pristine ng-valid ng-touched">
			      		<option value="0">请选择电表供应商</option>
			      		<option value="{{k.code}}" ng-repeat="k in ammeter_supplier_list">{{k.name}}</option>
			      		<!--<option value="1">蜂电</option>ammeter_supplier_list
			      		<option value="2">丁盯</option>-->
			      	</select>
				  </div><!-- /.col-lg-6 -->
				</div><!-- /.row -->
            	
            </div>
            <div class="modal-footer">
                <button class="btn bg-color" ng-disabled="sDb" ng-click="createAmmeter()">确定</button>
                <button class="btn" data-dismiss="modal" aria-label="Close">取消</button>
            </div>
        </div>
    </div>
</div>
<!--public弹窗-->
<public-alert></public-alert>
<!-- loading -->
<div class="modal fade" id="loading" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop='static'>
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title" id="myModalLabel">提示</h4>
      </div>
      <div class="modal-body">
        设备创建中请稍候。。。
      </div>
    </div>
  </div>
</div>

